1. Field of the Invention
The present invention relates to a RAID (Redundant Arrays of Inexpensive Disks) apparatus which allocates a plurality of same logical volumes to a real volume consisting of a plurality of physical disk units, and, more particularly, to a RAID apparatus which efficiently uses physical disk units with a plurality of logical volumes.
2. Description of the Related Art
Disk systems like a magnetic disk system are used as an external storage system in a computer system. A host computer accesses such a disk system with a logical volume name that an OS (Operating System) recognizes. Logical volumes, which are units of disk devices the host computer recognizes, are allocated in a disk system.
If each logical volume is allocated just one in such a disk system, when a physical disk unit where that logical volume is located fails, the logical volume cannot be used any more.
To prevent this shortcoming, a RAID apparatus has been proposed. A RAID apparatus has a plurality of same logical volumes allocated on different disk units. Even when one disk unit fails, another disk unit where the same logical volume is allocated can be used to access that logical volume.
FIG. 17 is a structural diagram of prior art. As shown in FIG. 17, a RAID apparatus comprises a plurality of magnetic disk units 91-1 to 91-4 and a disk controller 90 which controls those disk units. The capacity of each of the magnetic disk units 91-1 to 91-4 has been increased drastically. There is a limit to the capacity of a volume that an OS recognizes. For instance, while a single magnetic disk unit has a capacity of 9 gigabytes, a volume recognizable by an OS is a maximum of about 4.5 gigabytes.
In this respect, each of the magnetic disk units (real volumes) 91-1 to 91-4 is divided to volumes recognizable by an OS (which are called xe2x80x9clogical volumesxe2x80x9d).
The conventional scheme of combining logical volumes on the real volumes 91-1 to 91-4 was to make the combination of logical volumes on each real volume identical to the combination of logical volumes on another associated real volume.
As shown in FIG. 17, for example, the mirror structure of RAID-1 allocates two different logical volumes to each of the four magnetic disk units 91-1 to 91-4. Specifically, logical volumes #0 and #1 are allocated on the magnetic disk units 91-1 and 91-2, and logical volumes #2 and #3 on the magnetic disk units 91-3 and 914. This scheme maintains the contents of two real volumes identical to each other.
FIGS. 18A, 18B and 19 are diagrams for explaining the problems of the prior art. The loads on the individual logical volumes differ from one another depending on the properties of the logical volumes. Suppose that the numbers of accesses to the logical volumes #0, #1, #2 and #3 are 80 times, 60 times, 40 times and 20 times, respectively. FIG. 18A shows the corresponding numbers of accesses to the physical disk units in the conventional allocation of the logical volumes. Since the logical volumes #0 and #1 are allocated on the physical disk unit 91-1, the number of accesses becomes 70 times. Likewise, as the logical volumes #0 and #1 are also allocated on the physical disk unit 91-2, the number of accesses becomes 70 times. Because the logical volumes #2 and #3 are allocated on the physical disk unit 91-3, the number of accesses becomes 30 times. Likewise, as the logical volumes #2 and #3 are also allocated on the physical disk unit 91-4, the number of accesses becomes 30 times.
That is, uneven loads on the logical volumes directly result in uneven loads on the real volumes. For example, the loads on the physical disk units 91-1 and 91-2 where the logical volumes #0 and #1 are allocated become greater, while the loads on the physical disk units 91-3 and 91-4 where the logical volumes #2 and #3 are allocated become smaller.
Therefore, uneven loads on the logical volumes lead to uneven loads on the physical disk units. This causes a problem of increasing the chance of high-load physical disk units being busy, thus reducing the overall access speed.
In some cases, sequential copy may be made between logical volumes. For example, copying from the logical volume #0 to the logical volume #1 may be made as shown in FIG. 18B. In this example, contention to the physical disk unit 91-1 occurs when copying is done from the logical volume #0 of the physical disk unit 91-1 to the logical volume #1 of the physical disk unit 91-1.
Likewise, when copying is done from the logical volume #0 of the physical disk unit 91-2 to the logical volume #1 of the physical disk unit 91-1, access to the logical volume #1 of the physical disk unit 91-2 contends the copying operation. If sequential copy is made between logical volumes, therefore, the performance is considerably reduced.
Further, a physical disk unit may be damaged so that it should be in retreat mode. Suppose that the physical disk unit 91-1 fails as shown in FIG. 19. According to the prior art, the logical volumes allocated on the physical disk unit 91-1 are also allocated on the physical disk unit 91-2, so that loads will be concentrated on the physical disk unit 91-2.
If the access numbers of the individual logical volumes are as exemplified in FIG. 18A, with the physical disk unit 91-1 failing, the access numbers of the physical disk units 91-3 and 91-4 do not change, while the access number of the physical disk unit 91-2 alone increases, as shown in FIG. 19.
In retreat mode, therefore, loads are undesirably concentrated on the physical disk unit where the same logical volumes allocated on the failing physical disk unit are allocated, thus lowering the performance.
Accordingly, it is an object of the present invention to provide a RAID apparatus which prevents loads from being imparted on real volumes due to uneven loads on logical volumes.
It is another object of this invention to provide a RAID apparatus which auto-adjusts loads between real volumes.
It is a further object of this invention to provide a RAID apparatus which prevents the performance from being reduced by uneven loads on logical volumes.
A RAID apparatus according to this invention comprises a real volume including a plurality of physical disk units on each of which a plurality of different logical volumes are allocated, and a disk controller for accessing any physical disk unit where a designated logical volume is allocated in order to access the designated logical volume.
The real volume is designed in such a manner that a plurality of same logical volumes are respectively allocated on different physical disk units and a combination of a plurality of logical volumes allocated on each physical disk unit differs from one physical disk unit to another.
As apparent from the above, the combination of logical volumes to be allocated differs from one physical disk unit to another. Even if loads are not evenly imparted on the logical volumes, therefore, loading on the physical disk units is adjusted because of the difference in the combinations of the logical volumes to be allocated between the physical disk units. It is thus possible to prevent uneven loading on the physical disk units from occurring due to uneven loads on the logical volumes.
In a process of making a copy from one logical volume to another, it is possible to prevent contention of access to logical volumes which are undergoing the copying process, due to the difference in the combinations of the logical volumes to be allocated between the physical disk units.
Even in retreat mode, loads are distributed to the whole physical disk units to prevent over-concentration of loads for the combination of the logical volumes to be allocated on each physical disk unit differs from one physical disk unit to another.
Other features and advantages of the present invention will become readily apparent from the following description taken in conjunction with the accompanying drawings.